package edu.cmu.cs.stage3.alice.authoringtool.editors.questioneditor;

import edu.cmu.cs.stage3.alice.authoringtool.editors.compositeeditor.ComponentElementPanel;

public class ComponentQuestionPanel extends ComponentElementPanel{

	protected edu.cmu.cs.stage3.alice.core.question.userdefined.Component m_question;

	public ComponentQuestionPanel(){
		this.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,0,0,0));
		this.remove(grip);
	}

	//Rem @Override
	public void set(edu.cmu.cs.stage3.alice.core.Element element) {
		if (element instanceof edu.cmu.cs.stage3.alice.core.question.userdefined.Component){
			m_question = (edu.cmu.cs.stage3.alice.core.question.userdefined.Component)element;
			super.set(element);
		}
		else{
			throw(new java.lang.IllegalArgumentException());
		}
	}

	public edu.cmu.cs.stage3.alice.core.question.userdefined.Component getQuestion(){
		return m_question;
	}

}